package Encapsulation.封装;


import javax.imageio.stream.ImageInputStream;

interface A{
    int b(int num);
}
class Math{

    //定义一个求绝对值的方法
    public static int abs(int number){
        if (number<0){
            return  -number;
        }else{
            return  number;
        }
    }
}


public class clnaPoint {

    public static void printAbs(int num,A a){
        System.out.println(a.b(num));
    }

    public static void main(String[] args) {
        printAbs(-10,num -> Math.abs(num));
        printAbs(-10, Math::abs);
    }
}
